package com.yb.core.model;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * Copyright (C), 2022-2023, 姚兵
 * Author: 32210
 * Date: 2023/5/7 23:25
 * FileName: PageResult
 * Description:
 */

@Data
public class PageResult<T> implements Serializable {
    /**
     * 数据记录总数
     */
    Long counts;
    Boolean first;
    /**
     * 数据列表
     */
    List<T> items;

    Long itemsSize;
    /**
     * 当前页码
     */
    Long page;
    /**
     * 总页数
     */
    Long pages;
    /**
     * 一页数据数
     */
    Long pageSize;

    public PageResult(List<T> items,Long counts,Long page,Long pageSize){
        this.items=items;
        this.counts=counts;
        this.page=page;
        this.pageSize=pageSize;
    }
}
